The Media Kit Table of Contents | The Media Kit Index |
Derived from: BParameter
Declared in: be/media/ParameterWeb.h
Library: libmedia.so
Allocation: Constructor only
The BDiscreteParameter class represents a parameter that is set to one of a discrete set of values, and is usually used for non-linear values such as color spaces, multiplexers, and mutes or enables.
Each discrete value has a name that's displayed to the user by applications that draw a user interface for the node.
The default system theme renders these as BCheckBox controls, BRadioButton groups, or BMenuField controls, depending on the parameter kind. Other themes might implement these differently.
You never create or delete a BDiscreteParameter object yourself. Instead, call the BParameterGroup::MakeDiscreteParameter() function to create a BDiscreteParameter within the desired BParameterGroup.
|
Adds a new name/value pair to the list of possible values the control can take. Whenever the selection named name is chosen, the user interface application will send a value change message to the control with the specified value.
RETURN CODES
B_OK. The item was added successfully.
|
Returns the number of discrete values the control can take.
|
These functions return the name and value of the item at the specified index, where index ranges from 0 to CountItems()-1.
|
|
Removes all items from the BDiscreteParameter.
|
These functions add all inputs or outputs as selections, where the input or output's name is used as the item's name, and the input or output's index number is used as the value of the item.
These shortcuts let you easily create the item lists for MUX-like controls, which allow the user to choose one of a number of inputs or outputs.
|
|
Returns B_INT32_TYPE, which is the data type a BDiscreteParameter's value is maintained in.
The Media Kit Table of Contents | The Media Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..